{% extends 'base_main.html' %}
{% load static %}

{% block extCSS %}
    {{ block.super }}
    <link rel="stylesheet" href="{% static 'css/axf/main/cart.css' %}">
{% endblock %}

{% block extJS %}
    {{ block.super }}
    <script type="text/javascript" src="{% static 'js/axf/main/cart.js' %}"></script>
{% endblock %}

{% block content %}
    <div id="cart">
        <h3>购物车</h3>
        <div class="full">
            <section>
                <ul>
                    <li><span>收&nbsp;&nbsp;货&nbsp;&nbsp;人:Rock</span>
                        <div>
                            <p>
                                <span>修改&gt;</span>
                            </p>
                        </div>
                    </li>
                    <li><span>电&nbsp;&nbsp;&nbsp;&nbsp;话:110</span></li>
                    <li><span>收&nbsp;货&nbsp;地&nbsp;址: 湖北省武汉市</span></li>
                </ul>
                <div class="bill">
                    <p>闪送超市</p>
                    <p>满100减99优惠券，欢迎抢购</p>
                    <a href="#">凑单专区</a>
                </div>

                <div class="delivery">
                    <span>收货时间:</span>
                    <span>一小时可送达</span>
                    <a href="#">可预订&gt;</a>

                </div>

                <div class="delivery">
                    <span>备注留言:</span>
                    <input type="text" placeholder="如有特殊需求，请留言">

                </div>

{#              商品列表                #}
                {% for cart in carts %}
                    <div class="menuList" cartid="{{ cart.id }}">
                        <div class="confirm">
                            <span>
                                {% if cart.is_select %}
                                    <span>√</span>
                                {% else %}
                                    <span></span>
                                {% endif %}
                            </span>
                        </div>

                        <a href="#">
                            <img src="{{ cart.c_goods.productimg }}" alt="{{ cart.c_goods.productlongname }}">
                            <p>{{ cart.c_goods.productlongname }}</p>
                            <p>¥:{{ cart.c_goods.price }}</p>
                        </a>

                        <section>
                            <button class="subShopping">－</button>
                            <span>{{ cart.c_goods_num }}</span>
                            <button class="addShopping">＋</button>
                        </section>

                    </div>
                {% endfor %}



                <div class="payTheBill">

                    <div class="all_select">
                        <span>
                            {% if all_select %}
                                <span>√</span>
                            {% else %}
                                <span></span>
                            {% endif %}
                        </span>
                    </div>

                    <p>
                        <span>全选</span>
                        <span>共计:</span>
                        <span id="total_price">{{ total_price }}</span>
                    </p>

                    <span id="gen_order">下单</span>

                </div>

            </section>

        </div>

    </div>
{% endblock %}